package com.study.orderserviceprovider.environment;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Description：
 * @author: 李军容
 * @version: 2020/11/30 20:14
 */
public class ProfileTest {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
        applicationContext.register(ActiveProfileConfig.class);
        applicationContext.getEnvironment().setActiveProfiles("act");
        applicationContext.refresh();
        System.out.println(applicationContext.getBean(ActiveProfileTest.class));
    }


}
